<template>
  <section>
    <div class="question-title">{{csmwjtitle.value}}
      <div class="required" v-if="csmwjrequired.value==true">(*)</div>
    </div>
    <div v-if="csmwjimages!=null">
      <span v-for="item in csmwjimages.value" style="padding: 5px;">
        <el-image style="width: 50px; " :src="item.url" fit="fill"></el-image>
      </span>
    </div>
    <div>
      <el-input v-if="csmwjinput.format=='text' && csmwjinput.inputtype=='input'" v-model="csmwjinput.value"
        :placeholder="csmwjinput.placeholder" type="text"></el-input>

      <el-input v-if="csmwjinput.format=='text' && csmwjinput.inputtype=='textarea'" v-model="csmwjinput.value"
        :placeholder="csmwjinput.placeholder" type="textarea"></el-input>

      <el-input v-if="csmwjinput.format=='number'" v-model="csmwjinput.defaultvalue"
        :placeholder="csmwjinput.placeholder" type="text"></el-input>

      <el-input v-if="csmwjinput.format=='email'" v-model="csmwjinput.defaultvalue"
        :placeholder="csmwjinput.placeholder" type="text" prefix-icon="el-icon-message"></el-input>
      <el-input v-if="csmwjinput.format=='mobile'" v-model="csmwjinput.defaultvalue"
        :placeholder="csmwjinput.placeholder" type="text" prefix-icon="el-icon-phone-outline"></el-input>

      <el-input v-if="csmwjinput.format=='realname'" :placeholder="csmwjinput.placeholder" prefix-icon="el-icon-user"
        v-model="csmwjinput.value"></el-input>

      <el-input v-if="csmwjinput.format=='idcard'" :placeholder="csmwjinput.placeholder" prefix-icon="el-icon-tickets"
        v-model="csmwjinput.value"></el-input>

      <el-input v-if="csmwjinput.format=='regex'" :placeholder="csmwjinput.placeholder"
        v-model="csmwjinput.value"></el-input>

      <!-- <el-date-picker v-if="csmwjinput.format=='year'" v-model="csmwjinput.value" type="year" placeholder="选择年">
      </el-date-picker> -->

    </div>
  </section>

</template>

<script>
  export default {
    props: {
      csmwjtitle: {
        type: Object
      },
      csmwjimages: {
        type: Object
      },
      csmwjinput: {
        type: Object
      },
      csmwjrequired: {
        type: Object
      }
    },
    data() {
      return {}
    },
    mounted() {
      let that = this;
    },
    destroyed() {

    },
    methods: {

    }
  }
</script>
